Optimization of two-photon absorption enhancement in one-dimensional photonic crystals with defect states