I believe in the poem, the (hidden) subject should be the horse instead. It should go like
The horse dashes as it (my mind) wishes
The basic sentence should be 馬適, which means the horse goes, as mentioned by 水巷孑蠻.
The adverbial clause is 惟意所欲, which means 'only that the mind wishes', in other words 'freely'. In a way 惟 is there for emphasis.
As for the second part of your question, 為所欲為 again has an implied subject. If we insert 他 the sentence should go like this:
He does whatever he wishes to do
But the second 他 is omitted because it is already understood from the context. It is omitted out of simplicity, so much so the phrase 為所欲為 has become an idiom and somewhat adjectival.
I did find uses of 唯所欲為. See
The clause 唯所欲 is adverbial on 為, specifying the extent of liberty one has when he gives his orders. When combined, they mean 'orders belonging to the kind where he only does what he wishes', or more succinctly, 'orders entirely out of his wish'.
Against my intuition, Google returned 14,500,000 for 唯所欲為, 17,400,000 惟所欲為, and only 11,100,000 for 為所欲為. I think in terms of modern usage, they mean almost the same. Only their explanations are different, and I personally use 為所欲為.
In summary: 惟 is for emphasis, and 為 is the verb 'to do'. 所欲 invariably has a hidden subject 其 before it, meaning 'that he wishes'.
I read the question here (p.41).
The first and second choices are wrong because the meaning of 適 is interpreted as 適(かな)ふ, or the Chinese equivalent of 適合. The right interpretation should be 適(ゆ)く.
The third and fifth choices are also wrong because 意 is interpreted as the verb 意(おも)う, where the right part of speech here should be a noun. By process of elimination the fourth choice is no doubt the best answer.
But their interpretation is slightly different from ours. Essentially it treated these five characters (in bold) as an incomplete adverbial phrase altogether (adverbial on the hidden verb 適, italicised). Their complete sentence should be
The horse goes only to the place where my mind desires to go
That is evidenced by the addition of the dummy verb する in にして of the translation. It is equivalent to the italicised 適 here.
Ours, however, treated the same five characters (in bold) as a sentence save the hidden subject.
The horse goes only to the place where my mind desires
I believe both renditions are perfectly fine. The key difference lies in the understanding of whether the adjacent verbs 欲 and 適 belong to the same adverbial phrase (as in their case), or not (as in our case).
I added three characters 吾, 之, and 而 for clarity, with the following justifications:
- The 意 should be the poet's mind; see 馬雖有四足，遲速在吾心. (I translated it as the horse's own mind before this edit and have now corrected it)
- The 所 particle nominalises whatever verb(s) that follow(s) it. In order for two immediately adjacent nouns, i.e. 意 and 所欲(適), to make sense, the structural particle 之 can be inserted to indicate possession.
- The 而 particle is there for readability, creating a syntactical pause between the adverbial phrase 惟意所欲(適) and the verb 適.
As for your follow-up question, I believe adding 從 improves readability and does not alter the essential meaning, but it does touch up the syntactical structure within the adverbial phrase. 惟 no longer ornaments the nominal compound 意所欲(適) but the verbal phrase 從意所欲.