Preheat oven to 350 degrees F (175 degrees C). Cut off top of garlic heads to expose cloves. Place on a piece of aluminum foil, and drizzle with olive oil. Wrap the foil around the garlic, and bake for 30 minutes in the preheated oven.
Heat a large pot over medium heat. Saute onion until soft and translucent, about 5 minutes. Add roasted garlic cloves, tomatoes, vegetable broth, oregano, basil, and pepper; bring to a boil. Reduce heat to low and simmer for 30 minutes.
Puree soup with an immersion blender until smooth.