I have to wear ear protection at work but its causing sharp stabbing pains in my ears, what could be causing this?

Pressure on the ear. This may be related to pressure within the ear canal.. The skin in the ear canal is very thin and just below it is either cartilage or bone (depending on depth). You may want to try custom hearing molds which you can get at an ent's office or an audiologist. You can also try over-the-ear protection.
Pressure on bone. Perhaps it is exerting pressure against the bony part of your ear canal. Have doctor check for earwax. If none then try not inserting the plug so far into canal as to touch the bony part. Alternatively you may do better with earmuff style.