We devise an algorithm for finding the global optimal solution of the so-called optimal power flow problem (OPF) for a class of power networks with a tree topology, also called radial networks, for which an efficient and reliable algorithm was not previously known. The algorithm we present is called the tree reduction/expansion method, and is based on an equivalence between the input network and a single-node network. Finally, out numerical experiments demonstrate the reliability and robustness of our algorithm.