It could be very tight.
So here's my argument: Phelps has the intangibles and the motivation. He's been better on the Olympic stage, where he's always won those last-lunge finishes. Lochte, meanwhile, is preparing for a Phelps-like Olympic schedule he's never tried, with at least six events (he swam two in 2004 and four in 2008). We know Lochte handled the increased burden superbly at the world championships, but the Olympics take it up another notch.
Phelps and his coach, Bob Bowman, feed on any form of motivation they can find. You can bet Phelps is reminded daily about those two losses at worlds, where Lochte needed two personal bests to win by a combined half-second. Phelps said he wasn't in peak shape at that meet, but we also don't know if Lochte has reached his limit yet.
Karolyi essentially has two pools from which to choose. First, there are the teenagers who cruised to the 2011 world title -- Jordyn Wieber, Aly Raisman, McKayla Maroney, Sabrina Vega and Gabrielle Douglas. Second, the old guard (if there can be such a thing in gymnastics) in past Olympic and world championship medalists Johnson, Liukin, Sacramone, Rebecca Bross, Bridget Sloan and Chellsie Memmel. Wieber, the reigning world all-around champion, is a near lock for one spot. Maroney and Raisman are right behind. That leaves everyone else to fight for two more openings.
And then there are the relays. Jamaica has won the last three major 4x100s (2008 Olympics, 2009 worlds, 2011 worlds), but just ask the fumbling U.S. men about the dangers in negotiating speed with baton handoffs. There's also talk of Bolt's joining the 4x400 relay, where the U.S. will be favored regardless of the Jamaican lineup. Add it all up, and Bolt is beatable.
Of the four coveted spots on the U.S. 4x100 team, one will surely go to Phelps. Another will go to Nathan Adrian, assuming he's healthy and in form. Then it gets cloudy. There's Lochte, who many thought should have been on this relay at the world championships (where the U.S. settled for bronze without him). There are Garrett Weber-Gale and Cullen Jones, who were a part of the 2008 gold-medal relay. And then there's Lezak, who will be a grizzled 36. Lezak was the seventh-fastest U.S. man in the 100 meters in 2011. His 48.15 split in the relay at worlds was respectable, but he (and the team) needed to be better for the U.S. to win gold. There's no guarantee Lezak will make the Olympic team. Even if he does make it, there's no guarantee he'll be part of the relay final he made so magical in Beijing.