I definitely think you can cut a night (or two) from Hanoi.
I think the 2-day, 1-night Halong Bay cruise is enough, no real need for the extra night as someone suggested, IMHO.
4 nights in Hoi An might be more than you need too, unless (1) you plan time to relax on the beach, and/or (2) you need multiple visits to the tailor.