Holographic superconductor induced by charge density waves