Optical flares from the faint mid-dM star 2MASS J00453912+4140395