A four-quadrant detector (4QD) consists of four well-balanced detectors. We report on a Stokes polarimeter with optimal linear polarization measurements based on a 4QD. We turned the four intensity-detection channels into four polarization-analyzing channels by placing four polarizers and one quarter-wave plate in front of the individual detectors. An optimization method for the four polarization-analyzing channels is proposed to improve measurement accuracy. Considering applications in favor of linear polarization measurements instead of global optimization for all the possible states of polarization (SOP), we optimize the polarimeter first for the linear polarization components and then for the circular polarization component. The polarimeter is capable of simultaneous measurements of fast varying SOP with improved performance for the linear polarizations.