It's still quite possible for LeBron to sign with the Heat. The salary cap came in a bit higher than expected.
According to ESPN's Chad Ford -
'Higher cap still means MIA can't sign 3 MAX contracts with Beasley but the three could take $$15,646,179, instead of $16,568,908'
At this point, a savvy bargain hunter like Sam Presti of OKC should swoop in and offer a couple of future picks for Beasley and get his salary off Miami's books. Beasley is a headcase and thus a risk, but he's still easily worth that.
Even if they don't get rid of him, Wade, Bosh and LeBron really wouldn't be giving up that much money. The marketing possibilities for a 'Dream Team' like that are off the charts - it would surely repay them for what they would give up on the contracts.