As you might expect, planning astronauts' diets requires special considerations.
For starters, though astronauts exercise quite a bit in space, either on a treadmill or bicycle, all that floating around takes its toll on their muscles. They lose muscle mass in space. While you might think the body would need fewer calories in such conditions, it actually requires the same, or in some cases, an even higher number of calories than on Earth. And their diets must be carefully planned to help counteract loss of muscle mass and other negative effects of space flight on the body.
Besides muscle protein, astronauts also lose bone calcium and red blood cells. Scientists think that these changes may be a result of the body adapting to zero gravity. This environment seems to allow blood to circulate more easily and is less demanding on the skeleton. While such adaptations are fine and dandy for space, astronauts return to Earth eventually, and such changes can be detrimental when they're reintroduced to gravity. Also, spacecrafts protect astronauts from the sun's ultraviolet rays. While this is mostly a good thing, sunlight is one way the body gets vitamin D.
Eating a well balanced diet and, in some cases, taking supplements of Vitamin D can indeed help counteract these effects. More research is being done though to determine how else astronauts' diets might be designed to help them safely endure long space missions.