High-precision finite difference (FD) wavefield simulation is one of the key steps for the successful implementation of full-waveform inversion and reverse time migration. Most explicit FD schemes for solving seismic wave equations are not compact, which leads to difficulty and low efficiency in boundary condition treatment. Firstly, we review a family of tridiagonal compact FD (CFD) schemes of various orders and derive the corresponding optimization schemes by minimizing the error between the true and numerical wavenumber. Then, the optimized CFD (OCFD) schemes and a second-order central FD scheme are used to approximate the spatial and temporal derivatives of the 2D acoustic wave equation, respectively. The accuracy curves display that the CFD schemes are superior to the central FD schemes of the same order, and the OCFD schemes outperform the CFD schemes in certain wavenumber ranges. The dispersion analysis and a homogeneous model test indicate that increasing the upper limit of the integral function helps to reduce the spatial error but is not conducive to ensuring temporal accuracy. Furthermore, we examine the accuracy of the OCFD schemes in the wavefield modeling of complex structures using a Marmousi model. The results demonstrate that the OCFD4 schemes are capable of providing a more accurate wavefield than the CFD4 scheme when the upper limit of the integral function is 0.5π and 0.75π.