A Bradford teacher who sent explicit sexual images to what he believed was a 12-year-old girl has been banned from the profession for life.