I'm likely going to mimic by saying what many others have been saying, that if such a thing did suddenly become available, it would be up to the person to make that choice. I want to change one major thing though: this would not be given by pill, it would be given by shot, and it must be administered by a practicing doctor that is unrelated to the person receiving it. Also, the recipient must be of legal age and make that decision themselves (if it must, put this in writing, which is why I say they must be of legal age), and not their parents.
I say that it must be a shot so that it is harder to slip someone, and more difficult to force onto someone. The whole deal about the doctor and the recipient being of legal age is so that person receiving it knows what is happening and isn't forced this by parents that are "doing it for their own good." Changing anything in a persons identity, whether they mind, now or later, or not, is not a trivial matter.
Also, what about shots to make someone gay, or bi, emotionless, emotional, apathetic, religious, atheist, intelligent, limited, extroverted, introverted, enjoy video games, despise Nascar, like soaps, enjoy sitcoms, like Betty White, etc...?
The existence of a chemical that could change a person's innate desires and identity could have far reaching impacts and likely wouldn't necessarily be limited to sexual orientation.