Ask yourself why you ate the unhealthy foods. If it's because you were genuinely hungry, add some lean protein and "good" fats (nuts, avocado, olive oil dressing on salads) into your diet to prevent hunger from driving you toward unhealthy foods. If it's because you were lonely or bored, try finding something else to do until the feeling passes -- e.g., go for a walk, or text friends, or, ahem, do your homework.
If it's because you were out with friends and that's what they were eating, well, you'll just have to learn to say "no thanks." I know peer pressure can be strong among teenagers, but remember that no one is forcing you to eat anything. True friends will understand and support your desire to eat healthier food, or to find social activities that don't involve food. (I know it sounds corny, but bowling can be really fun. And, I see a lot of college kids around here bowling, so you'd be developing skills...

) Ultimately, though, it's up to you to make the right choices. This doesn't mean starving yourself, though!
Good luck, and keep checking in. Maybe you could sneak into the 20-something forum to get support from people who are closer to you in age? I don't know if 3fc has a teen forum.