In a saute pan, heat the oil over medium heat. Add the onions and cook, stirring, until soft and translucent, about 3 minutes. Add the garlic and cook until fragrant, 45 to 60 seconds. Add the wine and cook until reduced by half, 3 to 5 minutes. Add the okra, red pepper flakes, tomatoes, thyme and bay leaves. Season with salt and pepper. Cover, decrease the heat to low and simmer, stirring occasionally, until the okra is just tender, about 15 minutes. Taste and adjust for seasoning with salt and pepper. Serve immediately.