Chemical composition of stars with massive planets