Doctors have been known to prescribe Lanolin for the condition, but there is a better, quicker, and all natural remedy. Express your own milk, spreading it around the entire nipple and aereola, leaving it to dry. You should notice improvement within a few hours, and a great deal more after 24 hours. Continue doing this after each feeding even after you have healed. Keep in mind, you'll want to rinse baby's saliva from the nipples after each feeding.
Saliva contains enzymes which start to break down proteins in the digestion process.
If this method doesn't heal the nipples, it's possible that you have another common problem as well, yeast. About once a day, break open an acidophilus gel capsule and spread it around the nipple area. I have found that the inexpensive drug store acidophilus works best. The combination should work. The prescription lanolin, or any other product that you put on your nipples are undoubtedly going in baby's mouth.