I get frequent bad headaches causing me to be nauseous and sensitive to light. A doc I saw prescribed fiorinal (aspirin butalbital and caffeine) but it doesn't always work. Thoughts?

Headache syndromes. Could be migraine, but other causes are possible. If its migraine, many good treatments taken daily can prevent them. Taking 3 tablets 200 mg Ibuprofen with food, plus 1000 mg Acetaminophen (tylenol) if needed after 30 minutes can help the acute headache. See a headache specialist.
Migraines. Sounds like you might be having migraines. Fiorinal is a great pain medicine for headaches. If it is not helping, however, i might suggest a drug called Imitrex (sumatriptan) to help get rid of migraines. Doesn't always work but worth a shot. If you are experiencing these headaches frequently, your doctor may consider starting you on medication to help prevent these headaches.