Optoelectronic synapses are currently drawing significant attention as fundamental building blocks of neuromorphic computing to mimic brain functions. In this study, a two-terminal synaptic device based on a doped PdSe2 flake is proposed to imitate the key neural functions in an optical pathway. Due to the wavelength-dependent desorption of oxygen clusters near the intrinsic selenide vacancy defects, the doped PdSe2 photodetector achieves a high negative photoresponsivity of -7.8 × 103 A W-1 at 473nm and a positive photoresponsivity of 181 A W-1 at 1064nm. This wavelength-selective bi-direction photoresponse endows an all-optical pathway to imitate the fundamental functions of artificial synapses on a device level, such as psychological learning and forgetting capability, as well as dynamic logic functions. The underpinning photoresponse is further demonstrated on a flexible platform, providing a viable technology for neuromorphic computing in wearable electronics. Furthermore, the p-type doping results in an effective increase of the channel's electrical conductivity and a significant reduction in power consumption. Such low-power-consuming optical synapses with simple device architecture and low-dimensional features demonstrate tremendous promise for building multifunctional artificial neuromorphic systems in the future.