You can do that by booting into
Recovery (hold down Command-R at boot). Then in the menu bar click Utilities > Disk Utility, and erase the boot partition using the Erase option. Exit Disk Utility and double-click on "Reinstall OS X", to put a fresh install on the drive.