Reaching high-speed, high-fidelity qubit operations requires precise control over the shape of the underlying pulses. For weakly anharmonic systems, such as superconducting transmon qubits, short gates lead to leakage to states outside of the computational subspace. Control pulses designed with open-loop optimal control may reduce such leakage. However, model inaccuracies can severely limit the usability of such pulses. We implemented a closed-loop optimization that simultaneously adapts all control parameters based on measurements of a cost function built from Clifford gates. We directly optimize the amplitude and phase of each sample point of the digitized control pulse. We thereby fully exploit the capabilities of the pulse generation electronics and create a 4.16 ns single-qubit pulse with 99.76 % fidelity and 0.044 % leakage. This is a sevenfold reduction of the leakage rate and a threefold reduction in standard errors of the best DRAG pulse we have calibrated at such short durations on the same system.