Superconductivity and charge density wave under a time-dependent periodic field in the one-dimensional attractive Hubbard model