When is it safe to give my baby pain relievers without asking the doctor?

Pharmacist. You can go to your local pharmacy and talk to the pharmacist. Pharmacists do counsel on such things.
When the pain is.... ..Mild, of short duration, is not getting acutely worse, and is not accompanied by other severe symptoms. Some pains, such as testicular or eye, are emergent until proven otherwise.