In terms of grammar, both sentences are acceptable; the two, however, have very different meanings. The first sentence suggests that the fielder threw the ball in order to hit the keeper. In other words, his aim was to hurt the keeper. When you throw something at someone, you do so angrily; your intent is to hit the individual.
Example: The students threw stones at the minister’s car and broke all the windows.
The second sentence suggests that the aim of the fielder was to get the ball to the keeper. He wasn’t aiming to hit the keeper, but to get the ball to him.