Hi JPB
I would encourage you to discuss this fully with your doctor - none of us here know your history or specific details, and we can't give out medical advice here anyway.
There's a whole range of pain relief treatments out there - many tailored to suit those with addiction histories.
Open up a discussion with your doctor setting out your fears as you have here - and keep posting here. We also have substance abuse and a pain management forums you may be interested in.
Welcome
D