Having a gun is like having two __________'s:
if you whip out either one of them, people are gonna call 911.
I always preface legal posts with IANAL -- I Am Not A Lawyer -- and, in this situation, the best person to ask about this would be your chosen attorney.
(Of course, I fix my lawyer's computers, and they keep breaking, so I get a lot of free legal advice while I'm geeking).
I'm not sure if you would face criminal liability for defending your dog by shooting another dog, but you could expect two things: terrible press coverage, and civil liability suits. The third possibility, that the dog's owner or their relatives would seek revenge, is also a factor.
Having said that, I know I would shoot to protect either of our cats, and that's why I urge you to ask an attorney about what you might and might not do while armed.
(You do have a lawyer picked out, and the lawyer and their office staff know your name, right? If not, you are unarmed and naked where it really counts).