Optimal regulation of specialized medical care in a mixed system