Sometimes our minds generate thoughts that we deem "unthinkable" or forbidden, such as mothers with post-partum psychosis who imagine throwing their babies up against the wall or people with OCD having "intrusive thoughts" they can't control. It doesn't mean you'd ever actually ACT on the thought, but it may mean you're consciously or subconsciously afraid of being ridiculed for being gay, are disgusted by the gay lifestyle, or think that realizing you were gay would be one of the worst blows to your masculinity and self-image imaginable.
Of course it could also be your "shadow nature" coming to the surface (P.S.--the term shadow nature doesn't mean "bad" or "evil", it's just the things you've repressed. They can be positive things, as well.) Perhaps you're actually bisexual but have been conditioned to repress and ignore your feelings toward the same sex (unconsciously even) and the hallucinogen is showing you what lies beneath. Just one of many possibilities.
The best way to know for sure is to honestly assess your feelings when you're sober and in a good state of mind. Have you ever felt attraction to the same sex or fantasized about gay sex in your most private moments? If so, how did you handle it? If not, allow yourself to think about it for a minute: does the thought make you uncomfortable, gross you out, or are your feelings neutral? Does it turn you on? Remember that a person can be bisexual without ever acting on a same sex attraction...it's the THOUGHT that makes it so, but for some people it stops there. Others act on it. There is nothing whatsoever wrong with either option.
Try not to overanalyze your thoughts until you come down from your trip. Just let your mind go where it wants, and reflect on the meaning of those thoughts/feelings later. Learn to detach from your thoughts and be a casual observer, watching as they come and go. If you can't master this, you should rethink using psychedelic drugs.