Optimizing the fast Rydberg quantum gate