Gay tested positive for a banned substance in 2013 but had his punishment reduced to one year after cooperating with authorities. He returned to competition last summer.
"I was really upset about that," Bolt said in an interview with Runner's World published by the Times of London. "He got a year just because he talked to the authorities about how it was done and who helped him."
As a six-time Olympic champion and the fastest man in the world, Bolt has previously stated that cheaters should be kicked out of the sport. Gay is tied for the second fastest 100-meter time in history.
They could meet in the world championships this summer.
"It's the stupidest thing I've ever heard," Bolt said of Gay's reduced sentence. "The message should be: If you cheat you're going to be kicked out of the sport.
"I respected him so much over the years. He was a competitor, kept me on my toes and he pushed me to always do my best. Then to find out that he was on drugs — it’s a bit like I think parents must feel when they have a kid who does something bad and lets them down."
Follow David Wharton on Twitter @LATimesWharton