Photonic design of dielectric laser accelerators and quantum features of free electrons