Possibly, but only a veterinarian would know for sure. It could be tricky to adjust the dose of a human medication for a dog, because of the metabolism and weight factors. You could accidentally "put the dog to sleep".
I was a vet assistant and yes some pain pills are ok for dogs. you will have to look up which ones. I believe asprin is one but you will have to double check. Cats are the ones that can take ANY human pills. Dogs have a stonger core. Do a search or call a local vet. I know its hard to see an animal in pain, even more so when its one you love. I hope this helps.
I would only do so if you were in a remote area and not able to get to a vet, and then only after researching the effects of the particular drug on canines on the web. Some human pain meds could make your dog more miserable than had they not taken anything or cause a severe reaction. Veterinarians are the best source of meds to alleviate pain in suffering animals.