Yes it can, but the key is drying out the carpet quickly.  Use the MoldStainKlear interior formula, dilute 1/2 water, 1/2 treatment solution.