Study of the formation of soot and its precursors in flames using optical diagnostics