The answer to that is a definite yes and no.
Yes, technically you can eat whatever is within your calorie budget. The weight loss equation boils down to this: if you take in fewer calories than you burn, you will lose weight.
However, not all calories are nutritionally equal. Nor are they equally satisfying, life-sustaining, or economical. A homemade english muffin breakfast sandwich with an egg, cheese, and a slice of tomato is 300 calories. So is half a blueberry muffin. One of those choices will keep you full until lunch; one probably won't.
Then there's the issue of whether certain foods trigger addictive, binge-y behavior for you. Some people can eat just one of something, others can't. I don't know about you, but I have never gone on a green bean binge or been unable to stop scarfing down lean turkey. Cheez-its and Pringles, though? Different story. It's WAY easier for me to eat none of certain foods than "just a taste."
There was a lot of discussion recently about the
twinkie diet that a guy went on. So technically, yeah, if you can get by on three Twinkies, a can of green beans, and a couple of handfuls of Doritos a day, you could lose weight like that.
I'd rather eat big honkin' heapin' plates of food, though, so I couldn't personally do the Twinkie thing.