Despite the ever improving orchestral library technology, there is still not yet a substitute for the human feel of live musicians. Nevertheless, composers are increasingly asked to create orchestral music when there is no budget for live musicians. Invariably, we turn to our sample libraries to do the best possible rendition we're capable of.
When writing in this situation, it's important to remember that an idea in your head may not sound believable when you try to program it into a computer - even after hours of nuanced tweaking of velocity, duration, decay etc.
The solution is to really get to know your sample sounds intimately. Learn what samples, attacks and articulations sound the most realistic and build your ideas around those. Consider doing your writing at the MIDI piano roll (as opposed to at the piano, or freehand sketch etc) so that you know immediately what you are dealing with.
It's not an ideal situation, but we need to learn to make due with our limitations of time and resources.