This article proposes a metaheuristic optimization/social simulation approach to find the optimal team for a given type of the project. The quality of the team is assessed in a black-box optimization environment, where the optimized function acts as a metaphor of the project to be completed within the certain time limit (number of fitness function evaluations) and each fitness function evaluation is considered to be a metaphor of a unit task. The employees in a team are modeled according to the Belbin's Team Roles and the Particle Swarm Optimization (PSO) is used as a teamwork framework algorithm, while Evolutionary Algorithm (EA) as an algorithm for controlling the set of Team Roles for team members and leaders. This approach has been tested in a scenario of a simulated self-organizing team, where each employee decides about his own actions. The results from the performed simulation suggest, that such teams perform best if their leader is one of the actual work-oriented roles. Additionally, some projects required significantly different set of roles than the average team, resulting in improvement of the specialized team's performance over that of the average team.