Can my training and testing data for neural network be of different lengths?
You have 2 options:

First option, as @stormzhou commented above, you can pad you test data with zeros (not recommended) 
Second option, you can use for training and validation only 200 timesteps.
I am trying to use a recurrent neural network for a regression problem. I have 50 samples of 600 timesteps each. I am planning to use 40 for training and 10 for validation. 
After my network gets trained, can I use it to predict for a timeseries of a smaller length (200 timesteps)? 
The input and output dimensions (i.e. features) will remain same, just the length (i.e. number of timesteps) is smaller