Why don't you think about what you've said here.
You made a MISTAKE in the way you're playing The Elder Scrolls: Skyrim and for that MISTAKE of going into a town while having Dawnguard installed we're going to kill off some of your shop keepers and misc quest givers.
You shouldn't have to be tiptoeing around something as ridiculous as this to keep content in your game available for a character. A lot of people don't like this feature and it just isn't something you can ignore in game. You have to go out of your way to avoid NPC deaths at higher levels, whether it's constantly saving/loading or avoiding settlements entirely.
My first thought is that Yes, you should have to tiptoe around. Its a DLC revolving around Vampires ffs. As another poster said, its a sense of urgency. If you're ho-humming down the street, lolly-gagging everywhere you go then you're going to have a hard time with this. These are Vampires. They're sneak sobs and vicious as hell.
My second thought is why not? You spend about half of your game time "going out of your way" for just about everything.
I don't have Dawnguard, mostly because I don't buy anything until it comes down in price (it's really not a slight against the DLC itself), but your post makes no sense. Adding new content to the game that immediately makes it essentially impossible to continue to play the game normally is never the player's fault. If this DLC really results in persistent lore-breaking and game-altering attacks despite the player doing nothing different, it is a flaw (bug, if you will) in the DLC itself. Telling someone that by adding new content they have to just stop visiting all the towns and shops that are part of the base game until after they have completed the new content is absolutely ludicrous.
Cease visiting towns until the DLC is completed would be a last resort. I would think that as a player you (in general) would have learned to save and save often, and then save some more so that you can step back to in case something horrible like this happens. That you (in general) don't is really your fault. If you can't handle the fights as they come, spontanious though they might be, then that generally is your fault. So your first solution should be figuring out what you did wrong and how you might do it differently for a better result on the next reload.
Trial and error.
Try, try again.
If all else fails, avoid it until your high enough level to compete. In this sense, Dawnguard is no different.
Can I ask something how hard are the vampires that attack the town. Cause Beth fixing the vampires attcking towns seems unlikely but the one they do could they atleast lower the vampires level to that of the towns folk NPCs. Making them easier and less chance of NPCs dieing.
It varies. Depending on your level and the random lot you pull when that encounter pops up, they could be a lot of push over punks or one really vicious bastard that takes every available guard and your full Magika/Stamina pool to down.
All of mine have been random like this, both in numbers and levels. I've had one Volkihar level Vampire and a few dogs, a gaggle of thralls and one low level Vampire, I even had a Master, a Blooded, and a Fledgling Vampire team up on Windhelm guards. Usually whatever comes does so in pairs, but they've invaded in up to five for me. And that's just on my Vampire Lord character. I've also had a bunch of Dawnguard attack me in the city! That was fun...and by fun I mean a complete disaster

but it was of my own making so...

My Werewolf (Dawnguard side) has had two of those black robed vamps attack. They summon atronachs that are just vicious! These took a bit to take down, but so far all of my attacks have been rather manageable. I've even reloaded once because they killed Avanicci, only to have it not happen!...to my luck.
Sorry, but that's the most absurd solution I've ever read. So that's the best you can think in order not to have massacres in towns? Just stop visiting them until you beat the DLC?
I never thought Bethesda defenders would be SO blind...
Its a viable solution if you can't hack it. A solution we have all employed at one point even throughout our Vanilla play-through. If something is too rough for you right now, best to avoid triggering the event until you can handle your liquor like a man!
Vampire attacks don't occur if you side with the vampires?
They do. Oooohhhh boy, they certainly do

I can't tell you how many times I've been jumped on the road by a pack of blood thirsty Vamps out to make a name for themselves. When they fail miserably, and they always do, then they try to fight into the city to get at me. Who are they kidding? Pfft...rookies.
[Edit] I may need to clarify my words. It's 3am as i'm posting this and I'm a bit "sleep-drunk"...so go easy on me please