Using a lubricant to act as a barrier between clothes and nipples is one way. There are also special anti-chafing products such as Body Glide, or you can use petroleum-based ointments. Some people use special tape or bandages, but these can come off when you sweat. Instead of cotton, try synthetic material made for runners to lessen chafing.