Semiconductor nanowire arrays are a promising candidate for next generation solar cells due to enhanced absorption and reduced material consumption. However, to optimize their performance, time consuming three-dimensional (3D) opto-electronics modeling is usually performed. Here, we develop an accurate one-dimensional (1D) modeling method for the analysis. The 1D modeling is about 400 times faster than 3D modeling and allows direct application of concepts from planar pn-junctions on the analysis of nanowire solar cells. We show that the superposition principle can break down in InP nanowires due to strong surface recombination in the depletion region, giving rise to an IV-behavior similar to that with low shunt resistance. Importantly, we find that the open-circuit voltage of nanowire solar cells is typically limited by contact leakage. Therefore, to increase the efficiency, we have investigated the effect of high-bandgap GaP carrier-selective contact segments at the top and bottom of the InP nanowire and we find that GaP contact segments improve the solar cell efficiency. Next, we discuss the merit of p-i-n and p-n junction concepts in nanowire solar cells. With GaP carrier selective top and bottom contact segments in the InP nanowire array, we find that a p-n junction design is superior to a p-i-n junction design. We predict a best efficiency of 25% for a surface recombination velocity of 4500 cm s-1, corresponding to a non-radiative lifetime of 1 ns in p-n junction cells. The developed 1D model can be used for general modeling of axial p-n and p-i-n junctions in semiconductor nanowires. This includes also LED applications and we expect faster progress in device modeling using our method.