Generally, FD coefficients can be obtained by using Taylor series expansion (TE) or optimization methods to minimize the dispersion error. However, the TE-based FD method only achieves high modeling precision over a limited range of wavenumbers, and produces large numerical dispersion beyond this range. The optimal FD scheme based on least squares (LS) can guarantee high precision over a larger range of wavenumbers and obtain the best optimization solution at small computational cost. We extend the LS-based optimal FD scheme from two-dimensional (2D) forward modeling to three-dimensional (3D) and develop a 3D acoustic optimal FD method with high efficiency, wide range of high accuracy and adaptability to parallel computing. Dispersion analysis and forward modeling demonstrate that the developed FD method suppresses numerical dispersion. Finally, we use the developed FD method to source wavefield extrapolation and receiver wavefield extrapolation in 3D RTM. To decrease the computation time and storage requirements, the 3D RTM is implemented by combining the efficient boundary storage with checkpointing strategies on GPU. 3D RTM imaging results suggest that the 3D optimal FD method has higher precision than conventional methods.