The accumulation of high-throughput genomic and proteomic data allows for the reconstruction of the increasingly large and complex metabolic networks. In order to analyze accumulated data and reconstructed networks, it is critical to identify network patterns and evolutionary relations between metabolic networks. But even finding similar networks becomes computationally challenging. Alignment of the reconstructed networks can help to catch model inconsistencies and infer missing elements. We have formulated the network alignment problem which asks for the optimal vertex-to-vertex mapping allowing path contraction, vertex deletion, and vertex insertions. This paper gives the first efficient algorithm for optimal aligning of metabolic pathways with bounded tree width. In particular, the optimal alignment from pathway P to pathway T can be found in time O(|VP||VT|αa+1), where VP and VT are the vertex sets of pathways and a is the tree width of P. This significantly improves alignment tools since the E.coli metabolic network has tree width 3 and more than 90% of pathways of several organisms are series-parallel. We have implemented the algorithm for alignment of metabolic pathways of tree width 2 with arbitrary metabolic networks. Our experiments show that allowing pattern vertex deletion significantly improves alignment. We also have applied the network alignment to identifying inconsistency, inferring missing enzymes, and finding potential candidates for filling the holes.