This stuff gets even cat pee odor out, and that is by far nastier than dog pee odor:
SCOE 10X Super Concentrated Odor Eliminator
Buy the needle thing to get down into the carpet pad. I find it does not work so great on stains. For that I use "Get Serious" Stain and Odor extractor, you buy it at Petsmart. Warm it up first.