Terahertz Driven All Optical Electron Gun Design