An efficient technique to optimize beam weights and wedge angles in radiotherapy treatment planning has been developed. Based on the fact that a wedged field can be regarded as a superposition of an open field and a nominal wedged field, this approach reduces the problem of finding J beam weights and the corresponding wedge angles to optimizing a linear system with 2J unknowns (weights of J open beams and J nominal wedged beams), where J is the total number of incident beam directions. Two iterative algorithms similar to the iterative-least-square technique in image reconstruction are used to optimize the system. Application of the algorithms to two specific examples shows that this technique can reduce treatment planning time and effort, and promises to create a better solution for an arbitrarily complex treatment plan.