Optical signatures of Dirac nodal lines in NbAs2