Turn on and off custom post type from admin?

Yes, custom post types are registered on the fly, on every request. So you can create an option, say active_custom_post_types and check for that before you register the post type.

Pseudo-code:

$possible_cpts = array( 'book', 'portfolio' );
$active_cpts   = get_option( 'active_custom_post_types' );

if ( ! empty ( $active_cpts ) && is_array( $active_cpts ) )
{
    foreach ( $active_cpts as $cpt )
    {
         if ( in_array( $cpt, $possible_cpts ) )
            register_post_type( $cpt, get_args_from_somewhere() );
    }
}

error code: 523