Adjoint Topology Optimization Theory for Nano-Optics