Stopping twice during a 13 mi run is too much for any time of day. You should be able to at least go 45 min to an hour in the afternoon without a problem, even that close to lunch. Heartburn would be the more likely symptom of running to soon after eating.
Running in the morning is better for the reason noted above, but may not be the answer for you. Diet is probably the issue. If you are always having trouble after eating pasta, you may have an issue with wheat gluten. More than likely, it is probably dairy that is the issue. If you eat yogurt or cereal with milk at breakfast, try switching to something non-dairy. Gassy green veggies or beans may also be an issue. You just need to try eliminating possible trigger foods in your diet until you find what works.
If you are concerned about races, try taking a half of an immodium pill, or even just a quater, before the race. Make sure you test it out on a long run before trying it at a race. Immodium is strong stuff and can give you some stomach aches and can also be dehydrating.