Generating Realistic Counterfactuals for Retinal Fundus and OCT Images using Diffusion Models