Electronic structure and optical properties of semiconductor nanowires polytypes