It’s a wild guess on my part, but I suspect an allergic reaction is causing the upset stomach. Another possibility is a psychological eating disorder. Please note that these are wild guesses, and should not be taken as fact.
Try going to a different doctor, and this time suggest the two possibilities I have made. Try writing a list of all the foods that give you problems, and those that don’t, and take it with you as well. And this time don't take no for an answer. I wish you luck.