This paper focuses on optimizing pick-and-place tasks performed by a dual-arm collaborative robot in a specific shoe manufacturing industry environment. The robot must identify the parts of a shoe placed on a tray, pick them up, and place them in a shoe mold for further processing. The shoe parts arrive on the tray in random positions and angles and can be picked up in a different order. Optimizing these tasks could increase the assembly speed of each unit and improve shoe production. To achieve this goal, a mathematical model based on binary integer linear programming (BILP) has been developed. This model determines the optimal sequence for picking and placing the shoe parts in the mold, thus minimizing the time required for picking and decision-making. The effectiveness of this approach has been tested using two 3-piece unit shoe models: one for training and another for validation. These models encompass a total of 500 trays. An analysis of the results reveals that BILP offers advantages for task motion planning in complex environments with multiple trajectories and the potential for collisions between arms. The model's generalizability to shoes with n assembly parts further confirms its robustness for various part counts.