In most cases, it's probably possible to sedate the animal and remove it for safety without having to kill it. If there's a threat of disease and a genuine concern that it's spreading or can't be contained, that would be a situation that would justify killing an animal. If it's an escaped bear wandering a neighborhood but not directly hurting anyone, the officers should get animal control to tranquillize it and remove it from the area.
There is no question that if a police officer is being attacked or is trying to save a child from being attacked, that they should be able to shoot a dog. A lot of pitbulls and various other dog breeds can be very violent and should be put down if necessary.
As much as I love animals it hurts me to say that if the public is in danger posed by an attacking or rabid animal they must be put down. That's an emergency situation where loss of life is imminent. This reminds me of the rampaging orangutan that bit the lady's face off. It's tragic all the way around but he had to be put down.
If an animal is a threat to people within the vicinity of it then it'll have to be removed. Unfortunately, that may mean that the animal would have to die and if a cop has to put down a rabid dog in order to ensure someone isn't mauled to pieces then they have to do what they can to ensure the safety of others. I feel that there will be excuses regarding this but nonetheless I feel that if an officer is faced with this situation that they should be able to respond accordingly.