Synchronizability of dynamical networks can be defined as the ease by which the network synchronizes its activity. We propose a method for enhancing the synchronizability of dynamical networks by efficient rewirings. The method is based on the eigenvectors corresponding to the second smallest and the largest eigenvalue of the Laplacian matrix and a modified version of the simulated annealing approach is used to perform the optimization task. Starting from a simple network, i.e. an undirected and unweighted network, and at each step, an edge is selected for disconnection and two non-adjacent nodes for creating at edge in between. The effectiveness of the algorithm is tested on artificially constructed networks such as random, Watts-Strogatz, and scale-free ones. We also investigate the coincidence of two measures of synchronizability, i.e. the eigen-ratio of the Laplacian matrix and the cost of synchronization, in the optimized networks.