Self-consistent tight-binding calculations of electronic and optical properties of semiconductor nanostructures