Being a gay man I would say that the answer to your question is two-fold. Yes, of course they can say that they are straight, and say they are gay at the same time. A lot of gay men are quite good at doing that, and nobody would know the difference.
A good example of this would be Brokeback Mountain. The two men were in love with each other, while being married and fathering children, and neither of them would admit to being queer not even to each other. There are still men who have sex with men, who will never call themselves gay, so they certainly can say that they are straight, and believe it too. Lord knows I have met enough of them.
So, the two-fold part would be NO, if your question regards not having gay sex all together, the individual will never give up his or her desire to have a same sex partner, even if they don't act on it, they will still want to do it.
In my opinion, there are various levels of what is considered straight and gay. And, that is why so many people are so confused for years about which they are. Some men will think they are gay, even if they never have sex with another man.
While some straight men will have sex with lots of men, and never admit that they did it at all.
So, in general, the answer would be closer to maybe. Would you know that I was gay if I didn't tell you I was? A lot of people are very surprised when I tell them.
I could go around telling everyone I was straight if I wanted to. I just don't.