A widely tunable single-frequency Er-doped fiber laser is demonstrated in a 21-m-long linear cavity incorporating all-fiber acoustooptic frequency shifters and a saturable absorption grating. Stable single-frequency operation is achieved with a sidemode suppression ratio higher than 50 dB and a wavelength tuning range greater than 40 nm.