Fast chirp FMCW modulation with code division multiple access (CDMA) for multiple input multiple output (MIMO) radar is a commonly used technique for automotive radar, since it efficiently provides high range and angel resolution, as well as a long detection range. However, the ambiguity function of the fast chirp FMCW CDMA MIMO radar has high side-lobes in the Doppler domain, which degrade the detection performance in the case of multiple targets at similar range. In this paper, we consider the case of multiple targets that overlap in range, but during a detection interval their range difference migrates proportionally to the Doppler frequency difference between them. We derive an analytical expression for the ambiguity function in this case. From the analytical expression we obtain insight that high detection performance is achieved when the code attenuates the ambiguity function side-lobes inversely proportional to the Doppler frequency difference from the main-lobe. Therefore, we design a code sequence and FMCW chirp transmission times that jointly achieve this objective, and show the performance advantage in the probability of detection of the proposed approach compared to other reference methods.