A pellet pistol might scare a dog away, but it might enrage it too, and it is way too underpowered to stop it if it did enrage it into attacking.
If you dont want to kill the dog, I would use pepper spray. It works really good on dogs. Especailly if you got the bigger Bear models that spray up to 15 feet. I think cabelas and bass pro might have them.
A walking cane is actually what I use. It looks innocent, and if you wind up, you can really break something if you hit with it. Plus it helps to walk using it too. especially when you have to get up off a knee.
If you want to use a pellet pistol, I would get the little Co2 version of the PPK. It shoots bbs up to 400 fps and it is semi automatic, so you can blast away with one hand while you hold your dog or cane with the other hand.
But truthfully, if there is a dog that actually attacks you when you go for a walk. Get a pistol permit, and a .357
Dont go looking for trouble, go for your walk, mind your own business and obey all your local laws. But if you get attacked by a dog, any kid in your neighborhood could get attacked too, and it would be prudent to stop it permanently. Vicious dogs should be leashed and not loose.
MAKE SURE you check ALL your local ordinances about firearms.
You might find that you would actually get in more trouble shooting a dog with a pellet causing an injury, than killing it to protect your life.
Before you did anything, make sure you report a loose vicious dog to the police, so there are existing prior police reports of a vicious loose dog before you have to defend yourself.
Maybe if the police go talk to the owners, they will keep it locked up and that will solve the issue in the best way.