I've long thought that I should write "The Cookie Diet" and make millions. Replace one meal a day with two fresh-baked chocolate chip cookies (that counts as your dessert too). You'd loose weight and keep on the diet because it's awesome!
There's nothing wrong with eating "bad" food, even on a diet, as long as you compensate for it. If you're the kind of person who needs dessert (like me), then just replace a meal with dessert. As long as you eat healthy the rest of the time to compensate, it's perfectly fine and adds to your mental health as well!