A proposal for an all-optical memory based on a bistability of single-mode states in a dual-mode diode laser with time-delayed optical feedback is presented. The system is modeled using a multimode extension of the Lang-Kobayashi equations with injected optical pulses. We uncover the bifurcation structure by deriving analytical expressions for the boundaries of the bistable region and demonstrate how the delay time in the external cavity determines an optimal pulse duration for efficient switching of the memory element. We also show the relevant role played by gain saturation and by the dual-mode solutions of the Lang-Kobayashi equations for the existence of the bistable regions. Our results demonstrate that feedback induced bistability can lead to significant performance improvements when compared to memory elements based on the injection locking bistability in dual-mode devices.