A man was critically injured by officer gunfire after approaching the officer during unrelated traffic stop with weapon, police say.