From a legal standpoint, I'm pretty sure that so long as you don't introduce new information which is not necessarily true ("Unbeknownst to his family, Bob was a Satan worshipper who was responsible for the recent spate of sea otter murders in the area"), and specifically untrue in a way which could make it look like you have an ax to grind against a certain individual (i.e. nobody's going to care if you wrongly assert that someone's eyes are brown when in fact they're blue), you're probably in good shape. Outside of the UK, libel is exceedingly hard to prove, and in parts of the US as well as several other countries, if someone initiates a frivolous libel action against you, the judge can dismiss the case and require the plaintiff to pay all court costs.
From a "is this good writing" standpoint, I'm not so sure. Taking something that is "ripped from the headlines" is a nice start that lots and lots of writers do, but if you'll notice, you'll see that much of the time what these folks do is base their work on a true story rather than actually try to ground it in reality. There are a few really good reasons for this, libel being frankly way, way down the list. Reason #1: the difference between writing narrative fiction and writing journalism is that in the former you get to make stuff up. Primarily, you get to make up what people were thinking. In reality, you will never be able to get behind another person's eyes, not even if you're married to them for 50 years. In fiction, that person's in your head in the first place so you can do whatever you want.
Second, fiction is in many ways required to be more logical than real life. In real life, sometimes stuff just happens. You catch a cold and miss work the day an angry co-worker shoots up the workplace. You buy a rat from a big box pet store and it gives your child an extremely rare disease which he dies from. You, a woman who is named Svetlana who is a widow of a famous architect and who had a child also named Svetlana who died, seek out another woman named Svetlana to act as your foster daughter, and this new Svetlana turns out to be Josef Stalin's actual daughter. You put any of these events into fiction and people will say "okay, dude, put down the pipe and give me something real". People have a natural, perhaps instinctual reaction against weird things just happening for no apparent reason and while that may fly in real life because it's the truth, it's not necessarily going to fly in fiction.
Third, real life can be convenient and the great thing about making a story up in the first place - even one based on real events - is that when you run into a roadblock you can just make something up that will explain it. It may be that the person who you think killed the Black Dahlia or whoever had a perfectly good alibi the night of the murder. If you're only basing your book loosely on the story, you can do whatever you want to make that alibi hold true or not hold true. If you're trying to write journalism, then, well, even putting the libel angle aside, asserting that someone is lying without actually having proof is not good for your credibility.