Diet can definitely affect that! My kitten Athena had horribly stinky stools (and gas) when we first got her. It turned out that the grains/high carb content in the kibble she was eating were the problem.
Once I switched her to a grain-free, low-carb canned food, the problem improved. In her case it took raw feeding to solve it completely though. Either route is a good way to go with your cat.
Some canned brands I like are Wellness, Merrick, Blue Wilderness, and EVO. The raw brand I feed my cats is Primal, but homemade raw is another option as long as you make sure you have a thorough understanding of how to balance it first.