(Most of this post is focused on discussion of the surrounding issues, with little in the way of advice. If you actually have to deal with this problem, skip to the end.)
American defamation law is extraordinarily weak (relative to Europe) thanks to New York Times Co. v. Sullivan, which established the actual malice standard (you're only liable for defamation against a public figure if you knowingly published false information or wrote with "reckless disregard for the truth," which basically means you didn't care whether it was true). American courts are loath to interfere with freedom of speech or of the press just to make some politician happy. This suggests to me that a libel-in-fiction claim would be a long shot to begin with. Interestingly, we also have specific protection against foreign libel judgments, so I'll just be focusing on American law.
On the other hand, it does happen (NB: In New York, the "State Supreme Court" is the lowest court in the state). For our purposes, here is the most relevant paragraph:
Mr. Batra filed his lawsuit under a doctrine known as libel-in-fiction. To win his case, he must demonstrate that the identities of the real and fictional characters “must be so complete that the defamatory material” becomes a “plausible aspect” of the plaintiff’s real life, Justice Shafer wrote in her ruling, quoting case law.
It seems to me that a composite character could not pass that test. But it's less clear to me that this standard is in use across the entire US (what case is the judge quoting from?). And frankly, you don't really want to be in court arguing over this sort of thing unless you're very clearly in the right. In this case, NBC has already lost, because they now need to go through discovery and probably a full trial. That's expensive. (Actually, this happened back in 2008, but I haven't been able to find any further information about this case via cursory Googling. I imagine they quietly settled, but I can't confirm that. If anyone has a more recent link, it would really help.)
I found that link in this blog post, which seems to be very detailed and well-referenced. I would suggest consulting it for further information.
If you look at the copyright page of a book, you may see a notice like this one:
This is a work of fiction. Names, characters, places and incidents either are products of the author’s imagination or are used fictitiously. Any resemblance to actual events or locales or persons, living or dead, is entirely coincidental.
I find it rather hard to believe you can actually disclaim liability with a notice buried in part of the book which no one reads (unlike contract law, the reader never explicitly "agrees" to this disclaimer), but it probably doesn't hurt.
In short: Talk to your publisher, your editor, and their lawyer(s). They've dealt with this issue before and have a vested interest in helping you. If you're self-publishing, it's probably a good idea to discuss this and other legal issues (such as copyright registration) with a lawyer, since doing all those things by yourself can get rather complicated.