There's so much sci-fi to demonstrate the problems with legislation/enforcement based on "thought crime" rather than actual acts, ex. 1984. If we make impulses towards committing acts we currently consider crimes as illegal in themselves (thought crime) then everyone will be a criminal. Surely, out of frustration alone, everyone has had the impulse to commit assault, destruction of private property, etc.
Similarly, I don't think we should legislate against the desire to have sexual relations with children, but against the actual actions.
Naturally, as a non-pederast pedophile, you won't want to go around bragging about your illicit desires, but neither would you want to brag about the people you want to murder but haven't, the cars you want to steal but haven't, and so on. Granted the pederast's crimes are taboo in a way that these others aren't, based on the child's inability to give consent ("innocence" in this case not being that you know something is wrong and avoid it, but that you don't know what's wrong).
As for homosexuality's origins, I really lean towards biological causes, possibly with environmental triggers. Just google "homosexuality in higher mammals" and check out the results - notably not just those hosted on geocities, but tons of .edu's that support the theory, such as
these two studies. I don't mean to derail the thread with the biological homosexuality thing, so feel free to ignore that part.