Nanometer-scale prebunched electron beams generated from all-optical plasma-based acceleration