Taki knew that all the things which were happening to him from the past few days, like how his soul went into Mitsuha's body and all other things, would not remain like that for a long time. I think he could understand that after the end of the twilight, they would forget each other, like people forget dreams after waking up. It is obvious that he knew because Mitsuha's grandmother had told him that she also had the same experience when she was young and the same thing had happened to Mitsuha's mother also. But none of them remember much about it.
Based on all these things, according to me, Taki wrote 'I love you' instead of his name because he could feel that this was the last chance for him to convey his feelings. After the twilight ends, nobody knows whether they would meet again or not, whether they would remember each other or forget everything. So Taki thought his feelings were more important than his name at that moment.
There can be other explanations of this questions too, but I have written what I think about this topic.