We present a comprehensive treatment of optically preamplified direct detection receivers for non-return-to-zero (NRZ) and return-to-zero (RZ) on/off keying modulation, taking into account the influence of different (N)RZ optical pulse shapes, specified at the receiver input, and filter transfer functions; optical Fabry-Pérot filters (FPFs) and Bragg gratings as well as electrical fifth-order Bessel and first-order low-pass filters are considered. We determine optimum optical and electrical filter bandwidths and analyze the impact of bandwidth deviations on receiver sensitivity. Optimum receiver performance relies on a balance between noise and intersymbol interference (ISI) for NRZ transmission, while for RZ reception detection noise has to be traded against filter-induced signal energy rejection. Both for NRZ and 33% duty cycle RZ, optical filter bandwidths of around twice the data rate are found to be optimum. Receivers using RZ coding are shown to closely approach the quantum limit, and thus to outperform NRZ-based systems by several decibels. We further analyze the impact of important degrading effects on receiver sensitivity and optimum receiver bandwidths, including receiver noise, finite extinction ratio, chirp, and optical carrier frequency (or optical filter center frequency) fluctuations.