A quantum memory is a system that enables transfer, storage, and retrieval of optical quantum states by ON/OFF switching of the control signal in each stage of the memory. In particular, it is known that, for perfect transfer of a single-photon state, appropriate shaping of the input pulse is required. However, in general, such a desirable pulse shape has a complicated form, which would be hard to generate in practice. In this paper, for a wide class of linear quantum memory systems, we develop a method that reduces the complexity of the input pulse shape of a single photon while maintaining the perfect state transfer. The key idea is twofold; (i) the control signal is allowed to vary continuously in time to introduce an additional degree of freedom, and then (ii) an optimal control problem is formulated to design a simple-formed input pulse and the corresponding control signal. Numerical simulations are conducted for Λ-type atomic media and networked atomic ensembles, to show the effectiveness of the proposed method.