Nanofabrication using transmitted and diffracted light manipulated by gap spacing