A teacher at a former Nottingham school has admitted to indecently assaulting two underage girls when they were pupils there.