Dirac structures and their homotopy classification