Are you gluten intolerant? No? Then just stop eating baked goods and pasta. Read labels and don't purchase products that say they contain wheat flour. Unless you are truly gluten intolerant, it won't hurt you to occasionally eat a little.
It sounds to me like you have issues with food and your body image that are psychological in nature. Perhaps you can find counseling to help you develop a healthier relationship with food.