MiniCore includes the version of optiboot that allows you to write to flash and supports the ATmega328P: