Hi J.,
Yes, things like green peppers and onions CAN affect little tummies...but not always. Every baby is different. So, unless you know for a fact that these things affect him ... there is no guarantee. I wouldn't pump and dump. Have him nurse as usual. If he ends up with gas pains, then you know for sure. There are things you can do to help ease his pain....
bicycle legs
warm towel over his tummy
gently rubbing in a circular motion (right to left) his tummy
laying him across your lap on his belly and GENTLY bouncing
If it does affect him, the trouble will pass within the night.
I know when my daughter was affected by foods it was the feeding that took place about 3 hours after the offending food item.
Also, keep in mind, by about 6 months you should be able to start slowly adding things back into your diet. Their digestive systems are stronger and more mature by then. I was able to eat normally by 7/8 months. Just add items back in slowly. The biggest problem item for us was tomatoes. Those REALLY bothered my daughter ... and anything tomato based.
The things is, you do really sort of need to try out the foods and see if they bother your little one and then at the appropriate time start adding them back in. One of the great benefits of breastfeeding is the varied flavors baby gets! I nursed my daughter for what is considered an extended period of time. I never had any issues introducing solid foods. She readily ate just about everything. Even now at 18 months, there is very little she won't eat.
Oh, and it typically doesn't matter if the item is cooked or not.