We develop an evolutionary algorithm for solving challenging D-optimal design problems for complex statistical models. The algorithm originates from the Competitive Swarm Optimizer(CSO), which has been shown to be successful in solving many types of large scale optimization problems and easily outperforms other popular evolutionary algorithms. We show that by simply adding some particle mutations at every iteration, the algorithm finds better quality solutions compared to original CSO. We call this version Modified Competitive Swarm Optimizer(MCSO) and demonstrate its superiority using many benchmark test problems. We not only apply this algorithm to find locally D-optimal designs for Logistic models when there are more than five factors and all pairwise interactions but also find pseudo-Bayesian D-optimal designs for Logistic models with three factors and all pairwise interactions under very complicated and various prior combinations. Our work suggests that MCSO is a very promising, powerful and flexible optimization tool, especially for handling complex optimal design problems.