You do live in a member state of the EU, so you have the right to live and work anywhere in the EU. As far as I know, you can make more money in Western Europe than in Latvia for similar jobs, so I would try that first. Visa issues will be a major problem for you in the US, but are not an issue in UK, Germany, Netherlands, etc. where there must be a reasonable demand for programmers (don't know, not my field).
It's also much easier for you to travel across Europe and meet with people, work temporarily in an office, etc. and then set up telecommuting options.
Maybe you've already thought of this and/or tried this, but just in case.