How can I erase the data from my Macbook without losing my recent OS?
Apple provides instructions on erasing and reinstalling OS X, so the system will be as it was when it came from the factory: http://support.apple.com/kb/PH4439

These instructions guide you through reformatting the drive and reinstalling OS X via Recovery.