Substrate conformational dynamics facilitate structure-specific recognition of gapped DNA by DNA polymerase