MacBook speakers off, red light coming from the headphone jack
Old question but since I had 5 minutes ago the same problem, I'll post my solution:

The audio output is as Graham Min describes a double output, working for headphone jack or Toslink adaptor.
In my case the problem appeared as I disconnected my headphones: OSX didn't switch to integrated output but stayed on digital (optical) output

This page describes an elegant non invasive solution and in my case the solution was as simple as connecting the headphones again, and diconnecting them gently.

Here the steps


Plug your headphones back in.
Play a bit of sound through them (e.g., a song), then stop the sound.
Make sure Preferences is quit.
Launch Preferences and open the Sound pane.
While the Sound pane is open and set to Headphones, pull out the headphone plug from the jack.
It will reset itself to "Internal Speakers" and you are good to go.