If you are able to enter the Schengen region, you can also transit there. A valid onward ticket is necessary. Hotel Reservation for visa, just like the flight reservations, is among the unavoidable Latvia visa requirements, since the Latvian embassy should know where you've reserved to remain during your journey.