To accommodate the ever-expanding wireless data traffic volumes, mobile network operators are complementing their macrocellular networks by deploying low-power base stations (or small cells) to offload traffic from congested macrocells and to reuse spectrum. To that end, Ultra Dense Network (UDN) deployments provide means to aggressively reuse spectrum, thus providing significant enhancements in terms of system capacity. However, these deployments entail several challenges, including the increased complexity in network planning and optimization. In this paper, we propose a versatile optimization framework for planning UDN deployments. The planning and optimization framework is underpinned by metrics that consider scalability in terms of number of users, cost of densification, and fairness. The proposed methodology is evaluated using a real-world UDN planning case. The numerical results expose a number of interesting insights, including the impact of different bandwidth allocation strategies and spatial service demand distribution on the performance of various network topologies. Specifically, we provide a performance comparison of the optimized UDN topologies versus random (unplanned), regular grid, and heuristically derived UDN topologies. This comparison further underlines the need for flexible network planning and optimization frameworks as different operator performance metrics of interest may require different radio access networks configurations.