Say you have sex with a female, only to discover later that "she" was previously a "he". Is this Rape by Deception? http://en.wikipedia.org/wiki/Rape_by_deception
Rape by deception is a slippery slope. I can't count the amount of times I got laid by pretending to be awesome.
It would depend on the law in that particular jurisdiction - but I recommend full disclosure on your part to avoid the problem.
A week ago after demonstrations in the Philippines, a trial started for an American marine, age 19, who killed a transvestite, probably feeling he'd been raped. But no rape defense is being made, apparently because his lawyer and the U.S. military are too dumb to think of it as rape. The military has handed him over to locals, and the media is covering it like he's a monster. http://www.bing.com/news/search?q=philippines murder transvestite&FORM=AWNR