I'm not a doctor, however after googling, most websites suggest you to stop breastfeeding temporarily while taking this painkiller as it is very strong. You can pump and dump your breastmilk temporarily and restart again once you stop the painkillers.
Agree with the mom above, pump and throw. If really necessary, consult your dentist and see if he can prescribe any other alternatives which may not disrupt the bf.