A California regulator has ordered Tesla to correct conditions that have led to several air quality violations at its Fremont, California, factory.