Microstructure assisted phase transformation in pure and doped oxide nanostructures with optical and electrical properties