As astronaut is always to choose the food of his/her own choice . They have a tasting period of 15 days to eat and choose what foods he/she likes to eat in space and the food choice has to meet the standard for rocket travel though. Of course there will be moderation by nutrition experts to ensure the astronaut is getting the recommended diet value of car/calories and so on.
Kalpana Chawla, a vegetarian stayed in space for close to 31 days. There are a few other people who stayed much longer than this.
P.S.: Not every astronaut is going to be vegetarian but if they are going to Mars they should become vegans. The Mars living room test (underground test) for 1 year included only vegan foods.