Yes, but you should not. If you do then you no longer have backup power in case of an outage. Your computer will also throttle down to half-power if no battery is present. Lastly, it doesn't do anything to prolong the battery's life.
About Batteries in Modern Apple Laptops
Apple - Batteries - Notebooks
Extending the Life of Your Laptop Battery
Apple - Batteries
MacBook and MacBook Pro- Mac reduces processor speed when battery is removed while operating from an A-C adaptor
Battery University
Apple - Batteries - iPod
Apple - Batteries - iPhone
Apple - Batteries - iPad
Apple Portables- Calibrating your computer's battery for best performance
Mac notebooks- Determining battery cycle count
How to Calibrate Your Mac, iPhone, or iPad Battery | MacBlend