Ouch.. Difficult one.
Me; I wouldn't care, but then again; I'm a bit of a Pan. He might care. So I'd say he ought to know before he found out between some sheets...
Perhaps it's a good idea to start a chat with him about.. Well, start with your friend, who's homosexual. Then gradually work your way up to other sexuality-related things. Along the way, you can find out his opinions on all these subjects. Then toss transgender in there somewhere; you can easily find out his opinion on the matter without outright telling him you are TG.
If he responds completely uncaring about all, well, that's a good sign. If he responds well, well, even better. But if he responds negatively.. Well, you know what he feels about it, then, and it's not good.
In any case, near the end of the sexuality conversation, he'll know you're transsexual. But you won't dump him in the deep, since you 'warmed him up' to the subject.
And if that fails... Well, that's just miserable. So you'll just have to message me for a virtual hug. If it ends up well: We'll do the hug, anyway, and celebrate!
Anyway; there are a lot more experience people around here, on these boards, so I'd wait untill you heard their opinions, and advice, too.
Good luck!
Dryad.