Judge allows plea deal for doctor charged in Matthew Perry's ketamine death