Doctor in New Mexico guilty of illegally prescribing painkillers