You probably already know that sodomy is derived from "sin of Sodom" from the Bible story in which God rained fire and brimstone down on Sodom and Gomorrah for certain reasons.
My understanding is that some interpretations of these reasons are that God's angel messengers were (nearly) raped by the residents, so this meant that God objected to homosexuality. Therefore the "sin of Sodom" was homosexuality, which naturally was further interpreted as anal sex between two men. However, other interpretations might suggest any kind of "unnatural" sex act, including bestiality, oral sex, anal sex between any two people, and pretty much anything that's not missionary-style intravaginal intercourse.
Since what actually constitutes the "sin of Sodom" is open to debate, I imagine the definition of the word sodomy is also pretty fluid.
The dictionary definitions that I have found generally specify sodomy as anal sex, some include oral sex, and some include bestiality. This article has a quick reference as far as legal definitions of sodomy in the US.
I don't know a good history of sodomy, so I hope someone posts one, but I think that it is likely that oral sex and bestiality have been part of the definition since the beginning.