This may be doable but it will be a rush. One alternative would be to skip Miraflores and stay in the central zone and return to the airport from there. There's a lot to see and do in the center of Lima, and it's nice after dark (but be careful, lots of pickpockets and the like!).
If you decide to do the whole thing, I'd recommend against walking the distance from central Lima to Miraflores. Better to grab a cab to Parque Kennedy and then walk from there around Miraflores. Other quite walkable districts include San Isidro and Barranco.
La Rosa Nautica is fun because it's on a pier over the ocean. The bar there, perhaps the most humid place in the world, has excellent (and strong) pisco sours. But the food in the restaurant is at best so-so, and you can do much better at many places in Miraflores (my personal favorite is La Gloria, a short walk from Parque Kennedy).
IMO you do not need to arrive three hours early to the airport. Two hours is usually enough although it will depend on how long you have to stand in line to check in. If you're flying business or have frequent flier status and can check in with business class, you should have no trouble at all.