How to update selective options on plugin settings page

First kick in your validation callback by changing the register_setting() to

register_setting( 'pluginname_options', 'pluginname-settings', 'pluginname_validate' );

And then update your validation function to actually do something. Below it gets the current state of the options, and then only updates the pieces of the array that are submitted. When you are on a tab and click “Update” only the info in the tab is posted. Therefore the array (as written) only has 2 keys, and the info from the other tab is purged.

function pluginname_validate($input)
    {
    $options_array = get_option('pluginname-settings');

    if( isset( $input['optionname-one'] ) )
         $options_array['optionname-one'] = sanitize_text_field( $input['optionname-one'] );

    if( isset( $input['optionname-two'] ) )
         $options_array['optionname-two'] = sanitize_text_field( $input['optionname-two'] );

    if( isset( $input['optionname-three'] ) )
         $options_array['optionname-three'] = sanitize_text_field( $input['optionname-three'] );

    if( isset( $input['optionname-four'] ) )
         $options_array['optionname-four'] = sanitize_text_field( $input['optionname-four'] );

    return $options_array;
    }

I threw in a little sanitization for fun, the type of data santization depends on what your real options are, but you should always do some kind of sanitization.