From my point of view this is in line with the megalomaniac behaviour that Ultron demonstrates throughout the movie.
Ultron is not a completely rational being but more of a mad man. It has a grudge agains the avengers but one that is specifically focused on ONE avenger, Ironman, his creator.
This is mirrored from the comics too and can be narrowed to his reaction in the ship when they are getting the Vibranium and uses one of Tony Stark phrases and, later on, by a comment of the Vision "you specially" to Tony Stark. It is clear he despises Tony Stark.
The tendency is displayed in the movie with several traits that portrait his need to:
- Demonstrate Tony is wrong and that peace can only be achieved his way (you want the world to be in peace but you don't want it to change)
- Receive the recognition of "his" way being the right way.
- Get revenge from his creator by destroying all his allies
With that in mind we can understand better that Ultron wants to destroy the avengers but, specifically, he wants them to know how much they have failed, and above all, he wants to be listened.
All in all Ultron makes for a perfect representation of a psychopath that, over all the other concerns, wants the rest of the world to know about what he's doing, he wants the recognition... and that's why it would not kill Widow. It would not serve a purpose as he would not enjoy the look on Tony's face and it would not allow him to explain his plan to Natasha.