Deputy shoots man who shot dog