Crystal phase switching between the zincblende and wurtzite structures in III-V nanowires is crucial from the fundamental viewpoint as well as for electronic and photonic applications of crystal phase heterostructures. Here, the results of in situ monitoring of self-catalysed vapour-liquid-solid growth of GaAs nanowires by molecular beam epitaxy inside a transmission electron microscope is presented. It is demonstrated that the occurrence of the zincblende or wurtzite phase in self-catalysed nanowires is determined by the sole parameter, the droplet contact angle, which can be finely tuned by changing the group III and V fluxes. The zincblende phase forms at small (< 100°) and large (> 125°) contact angles, while pure wurtzite phase is observed for intermediate contact angles. Wurtzite nanowires are restricted by vertical sidewalls, while zincblende nanowires taper or develop the truncated edge at their top. These findings are explained within a dedicated model for the surface energetics. These results give a clear route for the crystal phase control in Au-free III-V nanowires. On a more general note, in situ growth monitoring with atomic resolution and at the technological-relevant growth rates is shown to be a powerful tool for the fine-tuning of material properties at the nanoscale.