There is currently a need for an efficient numerical optimization strategy for the quality of friction stir welded (FSW) joints. However, due to the computational complexity of the multi-physics problem, process parameter optimization has been a goal that is out of reach of the current state-of-the-art simulation codes. In this work, we describe an advanced meshfree computational framework that can be used to determine numerically optimized process parameters while minimizing defects in the friction stir weld zone. The simulation code, SPHriction-3D, uses an innovative parallelization strategy on the graphics processing unit (GPU). This approach allows determination of optimal parameters faster than is possible with costly laboratory testing. The meshfree strategy is firstly outlined. Then, a novel metric is proposed that automatically evaluates the presence and severity of defects in the weld zone. Next, the code is validated against a set of experimental results for ½” AA6061-T6 butt joint FSW joints. Finally, the code is used to determine the optimal advancing speed and rpm while minimizing defect volume based on the proposed defect metric.