As a singleton, this is always a problem for me. My solutions thus far:
Keep track of the produce, meat, or leftovers in your fridge (anything likely to go bad). Rotate older stuff to the front of the fridge so that you remember to use it up.
Only buy what you know you can use in a reasonable amount of time, no matter how good the deal is. (Obviously if you can freeze/store it in a way that it doesn't spoil, this doesn't apply.)
Figure out how long it takes bread to get moldy where you are--before it gets to that point, put it in the fridge. It'll dry out there, but when it gets too dry for sandwiches you can then use it to make croutons, bread pudding, etc.
Find flexible recipes that you can use different ingredients with, for example: quiches, frittatas, panade, different stews. I have a rotation of several recipes that I can throw whatever vegetables/cheese/meat I need to use up into, which works really well. You can also search by ingredient for recipes on food.com if you need to find a way to use up something specific.
It's not a perfect system--every once in a while I find something shoved to the back of the fridge that's a goner. But it works pretty well the rest of the time.