Peter Harvey, a Buddhist scholar who focuses fairly heavily on morality in Buddhism, writes at length on "culture war" issues like this, homosexuality, abortion, etc. in the context of the Pali canon. His Introduction to Buddhist Ethics explored issues related to transgendered people, in the chapter "Homosexuality and other forms of 'queerness'. It's worth a look. The full text can be found here - http://www.e-reading.me/bookreader.php/142060/An_Introduction_to_Buddhist_Ethics.pdf/ and it's a good read in general.
Here is an extract:
SEX-CHANGE
Early Buddhist texts refer to the sex of a person as something that can change within one life, as well as between lives. In the Vinaya, there is reference to a monk in whom the sexual characteristics of a woman appeared, and a nun in whom the sexual characteristics of a man appeared. In both cases, the Buddha appears to accept this and simply say that the ex-monk nun should follow the rules of the nuns, and the ex-nun monk should follow the rules of the monks. In commentarial literature, the sex of a person is seen as determined at conception, but as subject to possible change. Causes of sex-change are seen as karmic in nature. The Dhammapada commentary tells of a man instantly turning into a woman when he is sexually attracted to a monk; after marrying and giving birth, she then turns back to a man when she asks the monk’s forgiveness, and goes on to become an Arahat. Sex-change, then, is not seen as limiting spiritual potential.