Preheat oven to 450° F.
Coat a baking dish with cooking spray. Rub cod with 2 teaspoons oil. Sprinkle with pepper. Place on the prepared dish. Transfer to the oven and roast until the fish flakes easily with a fork; 15 to 20 minutes, depending on the thickness of the fillet.
Meanwhile, heat the remaining 1 teaspoon oil in a small skillet over medium heat. Add shallot/onion and cook, stirring, until beginning to soften, about 4 minutes. Add tomatoes and cook, stirring, until softened, about 2-3 minutes. Add olives and cook, stirring, for 1-2 minutes more. Stir in vinegar; remove from heat. Spoon the tomato mixture over the cod to serve.