I recommend against this in most cases. If breastfeeding is going well, then there shouldn't be a problem with soreness and certainly not cracking.
Soreness or nipple damage usually indicates that something is going wrong during feeding. If this happens to you, then it's a good idea to seek help as soon as possible to correct the problem.
The biggest problem with using over-the-counter creams and ointments is that they can create the kind of damage they are marketed to prevent. The idea is that they form a protective barrier on the nipple, but by doing so they also make the nipple very slippery. Then, when baby attempts to latch, her mouth actually slides out of place, so the areola isn't in her mouth the way it should be. This resulting shallow latch can cause the very pain and the damage that the products where being used to prevent.
If you already have sore or damaged nipples, I find hydrogel dressings (such as Ameda ComfortGel Hydrogel Comfort Pads) to be the most soothing way to help them heal. These products don't leave a residue that would interfere with baby's latch, and they provide a soothing, moist, healing environment to allow nipples to heal quickly. Once nipples are healed and breastfeeding becomes comfortable, there is no need to use any products on your nipples.