Can I take pain killers that are expired (2-6 months)?

Sure. They may not be as effective, though. But don't increase the dose... They are likely fine but may not be as effective.
No guaranty. The expiration date, required by us law since 1979, specifies only the date the manufacturer guarantees the full effect and safety of the drug and it does not mean how long the drug is actually "good" or safe to use. There had been rare reports of problem. In most cases there are decreased efficacies.
Best not to use them. Best to discard old pain medicine, especially morphine-like ones, after your pain has subsided. You should take them to your pharmacy or a local drop off place that accepts unused pain medications. They are often held at local fire houses.