Heat up the olive oil in a saucepan. Add the onion and chile peppers, if using, and stir. Cook until the onions are translucent and soft. Then add the tomatoes and salt, to taste. With the back of a wooden spoon, break up the tomatoes into little chunks. Add the string beans to the pan, cover with lid and let simmer for 10 to 15 minutes. Serve the dish hot or at room temperature.