Optimized erase EEPROM method