Probing high-redshift galaxies with Ly$\alpha$ intensity mapping