An Irvine physician agreed in federal court Wednesday to plead guilty to illegally distributing opioids, including some prescribed to a man convicted of running over and killing an off-duty Costa Mesa fire captain riding his bicycle in Mission Viejo.