We employ the Monte Carlo method to study a constrained optimization problem - packing hard spheres with unequal radii (r2>r1) into a 3-D bounded region, and its connection with the Gamma Knife radiosurgery treatment planning. Selection of the best fit solution is based on using the Boltzmann factor, e-DE/T, which allows us to search for the global optimal solution. As an illustration we determined the least number (≦15) of packed spheres that will occupy the largest volume for three different hypothetical tumor sizes (4115, 10000 and 36000 voxels). For the bounded regions and the sizes of the packed spheres that we studied here, the optimal volume packing ratio ranges from 41.3 to 48.7%. From our study, using a lower r2/r1 ratio is more desirable due to the ≦15 radiation shots constraint. The optimal volume packing ratio can be obtained within a relative short CPU computing time and could provide a good starting point for the radiosurgery treatment planning.