Optimization of hydrogen silsesquioxane for photonic applications