Devices for treating tattoos and pigmented lesions